﻿ // <copyright file="HelperTest.cs" company="Recipe Database">
//     Copyright (c) Recipe Database. All rights reserved.
// </copyright>
// <author>Bjarke Meier</author>
//-----------------------------------------------------------------------

namespace Core.Test
{
  using System.Reflection;
  using Microsoft.VisualStudio.TestTools.UnitTesting;

  /// <summary>
  /// This is a test class for HelperTest and is intended
  /// to contain all HelperTest Unit Tests
  /// </summary>
  [TestClass]
  public class HelperTest
  {
    /// <summary>
    /// Tests <code>Helper.GetThisAssemblyNamespace()</code>.
    /// </summary>
    [TestMethod]
    public void GetThisAssemblyNamespaceTest()
    {
      const string Expected = "Core";
      var actual = Helper.GetThisAssemblyNamespace();
      Assert.AreEqual(Expected, actual);
    }

    /// <summary>
    /// Tests <code>Helper.ThisAssembly</code>.
    /// </summary>
    [TestMethod]
    public void ThisAssemblyTest()
    {
      var expected = Assembly.LoadFrom("Core.dll");
      var actual = Helper.ThisAssembly;
      Assert.AreEqual(expected.FullName, actual.FullName);
    }
  }
}